<template>
  <div class="box">{{ 1 + 1 }}</div>
</template>
<script>
export default {
  data() {
    return {}
  },
  methods: {},
  mounted() {
    let obj = {
      key: 111,
      name: 1,
      age: 2
    }
    let list = new Map()
    list.set(obj.key, obj)
    list.set(222, obj)
    let obj2 = list.get(111)
    let flag = list.has(111)
    console.log(`flag`, flag)
    console.log(list, obj2)
    list.forEach((res, key) => {
      console.log(res, key)
    })
    for (var item of list) {
      console.log(`obj`, item)
    }
    //
    //4000 2000 2000
    //4000 4000 0
  }
}
</script>
<style type="text/css">
.box {
  width: 100px;
  height: 100px;
  border: 1px solid #000;
}
</style>
